class Message:
    def __init__(self, group_name, nick_name, content, attachment, to, receive_time):
        self.group_name = group_name
        self.nick_name = nick_name
        self.content = content
        self.attachment = attachment
        self.to = to
        self.receive_time = receive_time

    def __str__(self):
        return (f'群名称:{self.group_name}\n'
                '发送人{self.nick_name}\n'
                '发送内容{self.content}\n'
                '接收人{self.to}\n'
                '接收时间{self.receive_time}'
                )